package top.xia17.plugins.fast.user.model.dto;

import top.xia17.plugins.fast.common.database.jpa.extension.BaseUserTimeEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.Objects;

/**
 * 角色DTO
 * @author xia17
 * @since 2022/2/22 19:49
 */
@Getter
@Setter
@Accessors(chain = true)
public class RoleDto extends BaseUserTimeEntity {


    /** 角色ID */
    private Long id;

    /** 角色名 */
    private String name;

    /** 描述 */
    private String description;

    /** 权限标识 */
    private String permission;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        RoleDto roleDto = (RoleDto) o;
        return Objects.equals(id, roleDto.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
